from flask import Flask, render_template
from utils.database import app, db
from Controllers.CompileController import compile_bp
from Controllers.MessageController import message_bp
from Controllers.ProblemController import problem_bp

from flask_cors import CORS
CORS(app, resources={r"/*": {"origins": "*"}})

app.register_blueprint(compile_bp)
app.register_blueprint(message_bp)
app.register_blueprint(problem_bp)

@app.route('/')
def show_ques_list():
    return render_template('show_ques_list.html')

@app.route('/question/do')
def do_question():
    return render_template('do_ques.html')

if __name__ == '__main__':
    app.run(debug=True)